package com.wuzf.controller;


import com.wuzf.common.entity.CommonResult;
import com.wuzf.common.entity.Payment;
import com.wuzf.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {


    @Autowired
    private OrderService orderService;

    @GetMapping("/order/payment/create")
    public Object create(Payment payment) {
        return orderService.create(payment);
    }


    @GetMapping("/order/payment/get/{id}")
    public Object get(@PathVariable(value = "id") long id) {
        return orderService.findById(id);
    }

}
